#pragma once
#include "Syntax/Object/Object.hpp"
#include <cstdint>
#include <string>

class Integer : public Object
{
public:
    int64_t Value;

public:
    Integer() : Integer((int64_t)0) {}
    Integer(const int64_t value) : Object(TypeKind::Int), Value(value) {}

    Integer(SharedObject ob) : Object(TypeKind::Int)
    {
        if (ob->GetType() == TypeKind::Int)
        {
            this->Value = ((Integer *)ob.get())->Value;
        }
        else
        {
            this->Value = 0;
        }
    }
    virtual ~Integer() {}

public:
    virtual std::string ToString() const override { return std::to_string(Value); }

public:
    Integer *operator++()
    {
        this->Value++;
        return this;
    }

    bool operator>=(const Integer &ref) { return this->Value >= ref.Value; }
    bool operator>(const Integer &ref) { return this->Value > ref.Value; }
    bool operator<(const Integer &ref) { return this->Value < ref.Value; }
    bool operator<=(const Integer &ref) { return this->Value <= ref.Value; }

    // Integer operator-() { return Integer(-Value); }
    // Integer operator+(Integer &ref) { return Integer(Value + ref.Value); }
    // Integer operator-(Integer &ref) { return Integer(Value - ref.Value); }
    // Integer operator*(Integer &ref) { return Integer(Value * ref.Value); }
    // Integer operator/(Integer &ref) { return Integer(Value / ref.Value); }
    // Integer operator%(Integer &ref) { return Integer(Value % ref.Value); }
    // Integer* operator+(Integer *ref) { return new Integer(this->Value + ref->Value); }
    // //Integer operator-(Integer &ref) { return Integer(Value - ref.Value); }
    // Integer * operator*(Integer *ref) { return new Integer(Value * ref->Value); }
    // //Integer operator/(Integer &ref) { return Integer(Value / ref.Value); }
    // //Integer operator%(Integer &ref) { return Integer(Value % ref.Value); }
};